'''
This file is part of ModeliMark.

ModeliMark is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.

ModeliMark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with ModeliMark.
If not, see <http://www.gnu.org/licenses/>.

Copyright 2011 Jens Frenkel
'''

import os
import settings
import benchmark
import wrapper
import modelgenerator

# get compiler phat
OPENMODELICAHOME = os.environ.get('OPENMODELICAHOME')
omcpath = '%s/bin/omc.exe'%(OPENMODELICAHOME)

print omcpath

numbers = list()
eqs = list()
k = 2
equations = 38
for i in xrange(11):
    numbers.append(k)
    eqs.append(equations)
    k = k+1
    equations = equations*2+4

task = 'classofclass_omc'
print task
# workdir
workdir = '%s/%s'%(settings.globalworkdir,task)

# model
model = modelgenerator.ClassofClass()
compiler = wrapper.OMC(omcpath)
bench = benchmark.BenchmarkComponent()
bench.runBenchmark(compiler, model, workdir, '%s.csv'%(task), numbers)